//===- AADriver.cpp - Driver for Alias Analysis" --------------------------===//
//
//	Copyright (C) 2014	Victor Hugo Sperle Campos
//						George Souza Oliveira
//				
//
//===----------------------------------------------------------------------===//

#define DEBUG_TYPE "AADriver"

#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/AliasSetTracker.h"
#include "llvm/Analysis/MemoryDependenceAnalysis.h"
#include "llvm/Pass.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Function.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"


namespace llvm {
// AADriver
struct AADriver : public ModulePass {
	static char ID; // Pass identification, replacement for typeid
	AADriver() : ModulePass(ID) {
		AA = 0;
	}

	virtual bool runOnModule(Module &M);

	// We don't modify the program, so we preserve all analyses
	virtual void getAnalysisUsage(AnalysisUsage &AU) const;
	
	// Alias Analysis data structure that we get from Andersen
	AliasAnalysis* AA;
	
	// Alias sets built from AA
	AliasSetTracker* AST;
};
}
